#ifndef HANDLE_H
#define HANDLE_H

#include <wtypes.h>

namespace syncLib
{

    class Handle
    {

    public:
        Handle();
        explicit Handle(Handle& h);

        ~Handle();


    public:
        Handle(const HANDLE& h);
        Handle& operator=(Handle& h);

    public:
        operator HANDLE() const;

    public:
        void Attach(HANDLE h);
        HANDLE Detach();
        BOOL Close();

    protected:
        HANDLE mHandle_;
    };

};

#endif // HANDLE_H
